<template>
	<div class="User">
		<h1>我是个人中心页</h1>
		<div v-if="isLogin">
			<h2>我的用户名是{{$route.params.userName}}</h2>
		</div>
		<comLogin v-else></comLogin>
	</div>
</template>

<script>
	import comLogin from '@/components/comLogin.vue';
	export default {
		name: "User",
		data: function() {
			return {
				isLogin: false
			}
		},
		components: {
			comLogin
		},
		beforeMount() {
			this.isLogin = localStorage.getItem('isLogin');
		}
	}
</script>

<style>
</style>
